<?php

namespace Database\Seeders;

use App\Models\Admin;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Hash;

class AdminTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        // 清空管理员表
        Admin::query()->truncate();
        Admin::query()->create([
            'name' => '超级管理员',
            'phone' => '13812345678',
            'email' => 'admin@example.com',
            'password' => Hash::make('test123456'),
            'is_super' => 1,
            'avatar' => '/static/images/avatar.jpg',
            'status' => 1,
        ]);
    }
}
